package com.xm.biz.impl;

import com.xm.biz.UserScoreBiz;
import com.xm.dao.UserScoreDao;
import com.xm.dao.impl.UserScoreDaoImpl;
import com.xm.po.UserScore;
import java.util.List;

/**
 * @author Administrator
 * @create 2020-09-08 19:36
 * @desc 用户积分业务逻辑实现类
 **/
public class UserScoreBizImpl implements UserScoreBiz {
    UserScoreDao userScoreDao = new UserScoreDaoImpl();
    /**
     * 获取所有用户积分列表
     * @return
     */
    @Override
    public List<UserScore> queryAll() {
        List<UserScore> userScores = userScoreDao.queryAll();
        return userScores;
    }
    /**
     * 根据积分编号删除积分信息
     * @param scoreId
     * @return
     */
    @Override
    public boolean delete(Integer scoreId) {
        boolean delete = userScoreDao.delete(scoreId);
        return delete;
    }
    /**
     * 根据id查询用户积分
     * @param scoreId
     * @return
     */
    @Override
    public UserScore select(Integer scoreId) {
        UserScore select = userScoreDao.select(scoreId);
        return select;
    }
    /**
     * 根据用户信息修改用户积分信息
     * @param userScore
     * @return
     */
    @Override
    public boolean updateById(UserScore userScore) {
        boolean b = userScoreDao.updateById(userScore);
        return b;
    }
}
